package com.huilian.iotbox.data.enums;

import lombok.Getter;

@Getter
public enum CommodityStockRecordFirstTypeEnum {
    INTO_STOCK_ORDER(1,"入库单"),
    OUTBOUND(2,"出库"),
    ALLOCATE_AND_TRANSFER(3,"调拨"),
    RETURN_OF_GOODS(4,"退货"),
    INVENTORY_SHEET(5,"盘点单"),
    INVENTORY(6,"备货单"),
    GENERAL_RECORD_SHEET(7,"普通记录单"),
    ;
    private Integer code;
    private String desc;

    CommodityStockRecordFirstTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getDesc(Integer code){
        CommodityStockRecordFirstTypeEnum[] values = CommodityStockRecordFirstTypeEnum.values();
        String desc = null;
        for (int i = 0; i < values.length; i++) {
            if (values[i].code.compareTo(code) == 0){
                desc = values[i].desc;
                break;
            }
        }
        return desc;
    }
}
